﻿<%@ Control Language="C#" Inherits="Web.Control.WWW.Wiki.Search" %>
<asp:Literal ID="lLCount" Text="15" runat="server" Visible="false" />
<div class="common">
	<div id="new_body">
		<div id="body_900">
			<div id="body_left"></div>
			<div id="body_main">
								<asp:Literal ID="lblResults" runat="server" />
				<div class="submenuN">
					<div class="submenuN_position">
						<div class="submenuN_title">
							<div class="submenuN_Btitle">
								<h1><%=GetText("WK102")%></h1>
							</div>
							<div class="submenuN_button"><%if (((Lx.Web.Common.UI.TDTPageBase)Page).IsAffirm){%><a href="/knowledge/edit.htm" class="Naddbtn btnspec" style="text-decoration:none"><%}else{ %><a href="#" onclick="NotAffirm()" class="Naddbtn btnspec" style="text-decoration:none"><%} %><span><%=GetText("WK004")%></span></a></div>
						</div>
					</div>
				</div>
				<div class="Center9001n">
					<div class="Center9001Right">
						<div class="Center9001Content">
							<div class="knowedge_area">
								<div><asp:TextBox ID="txtSearch" runat="server" CssClass="common450" /> <asp:Button ID="btnGo" runat="server" Text="***Go***" OnClick="btnGo_Click" ToolTip="Click here to start the search" CssClass="buttong" /></div>
								<div class="margin5">
									<asp:CheckBox ID="chkFullSearch" runat="server" Text="Full-text search (slower)" ToolTip="Check this to search the pages title AND contents" /><br />
									<%=GetText("C0016")%>
									<asp:DropDownList ID="ddlL" runat="server">
									</asp:DropDownList>
									&nbsp;&nbsp;<%=GetText("C0017")%>
									<asp:DropDownList ID="ddlB" runat="server">
									</asp:DropDownList>
								</div>
								<div class="margin20">
									<h4><%=GetText("WK103")%></h4>
									<p><asp:CheckBox ID="chkUncategorized" runat="server" Text="Uncategorized Pages" Checked="True" Style="font-style: italic;" /><br />
									<asp:CheckBoxList ID="lstCategories" runat="server" RepeatDirection="Horizontal" RepeatLayout="Flow" /></p>
									<div style="border-bottom: 1px #eee solid; padding-bottom:5px; text-align:right">
										<%=RecordCount%> <%=GetText("WK017")%>: 
										<%if(Order.ToLower()=="[datetime]") {%>
										<strong><%=GetText("C2002")%></strong>
										<%}else{ %>
										<a href="javascript:void();" onclick="SetOrder('[datetime]')"><%=GetText("C2002")%></a>
										<%} %>
										 | 
										<%if(Order.ToLower()=="[sl]") {%>
										<strong><%=GetText("C2011")%></strong>
										<%}else{ %>
										<a href="javascript:void();" onclick="SetOrder('[sl]')"><%=GetText("C2011")%></a>
										<%} %>
									</div>
								</div>
								<div>
										<ul class="wiki_list">
											<asp:Repeater ID="rptLB" runat="server">
												<ItemTemplate>
											<li><span class="blue14bu"><a href="/knowledge/<%#(Model.WWW_WWW.Wiki.PageType)Eval("Type")==Model.WWW_WWW.Wiki.PageType.Wiki?"wiki":"contribution" %>-<%#HttpUtility.UrlEncode(Eval("Name").ToString())%>.htm">
											<%#Lx.Web.Common.UI.Globals.GetString(HttpUtility.HtmlEncode(Eval("Title").ToString()),80)%></a></span>
												<span class="grey10"><%#FormatDiffDate(GetText("C0036"), Eval("DiffDate").ToString())%></span></li>
												</ItemTemplate>
											</asp:Repeater>
											<%if (rptLB.Items.Count == 0){%>
											<li><%=GetText("WK005")%></li>
											<%} %>
										</ul>
								</div>
								<div class="page_num">
									<%=CreatePageNav(RecordCount, int.Parse(lLCount.Text), PageIndex, 
										"",string.Format("<span class='page_none grey10'><a href='javascript:void(0);' onclick='SetPageIndex($I$)'>{0}</a></span>&nbsp;",HttpUtility.UrlEncode(GetText("..."))),
										"",string.Format("<span class='page_none grey10'><a href='javascript:void(0);' onclick='SetPageIndex($I$)'>{0}</a></span>&nbsp;",HttpUtility.UrlEncode(GetText("..."))),
										string.Format("<span class='page_select'>{0}</span>&nbsp;",PageIndex),
										"<span class='page_none grey10'><a href='javascript:void(0);' onclick='SetPageIndex($I$)'>$I$</a></span>&nbsp;")%>
										<input type="hidden" value="<%=PageIndex%>" name="p" id="p" />
										<input type="hidden" value="<%=Order%>" name="o" id="o" />
										<script>
										function SetPageIndex(i)
										{
											if(i==-1) i="L";
											document.getElementById("p").value = i;
											document.forms[0].submit();
										}
										function SetOrder(order)
										{
											document.getElementById("o").value = order;
											document.getElementById("p").value = 1;
											document.forms[0].submit();
										}
										</script>
								</div>
							</div>
						</div>
					</div>
					<div class="Center9001Left">
						<div class="right_layerA">
							<div class="layer_contentA"><img src="/Images/icon_tips.gif" align="absmiddle" /> <strong><a href="/knowledge/wiki-How+to+edit+the+italki+wiki1.htm">How do I edit italki wiki?</a></strong></div>
						</div>
					</div>
					<div class="clear"></div>
				</div>
			</div>
			<div id="body_right"></div>
			<div class="clear"></div>
		</div>
		<div id="body_900F"></div>
	</div>
</div>